package cn.zwk.service.model;

import cn.zwk.eval.EvaluationResult;
import cn.zwk.excel.ColumnIdentifier;
import cn.zwk.request.HttpRequestDefinition;
import cn.zwk.request.HttpResponse;

/**
 * 单条执行记录（对应某一行某一语句列）。
 */
public final class ExecutionRecord {
    private final int rowIndex;
    private final String key;
    private final ColumnIdentifier column;
    private final String query;
    private final HttpRequestDefinition request;
    private final HttpResponse response;
    private final EvaluationResult evaluation;

    public ExecutionRecord(int rowIndex, String key, ColumnIdentifier column, String query,
                           HttpRequestDefinition request, HttpResponse response, EvaluationResult evaluation) {
        this.rowIndex = rowIndex;
        this.key = key;
        this.column = column;
        this.query = query;
        this.request = request;
        this.response = response;
        this.evaluation = evaluation;
    }

    public int rowIndex() { return rowIndex; }
    public String key() { return key; }
    public ColumnIdentifier column() { return column; }
    public String query() { return query; }
    public HttpRequestDefinition request() { return request; }
    public HttpResponse response() { return response; }
    public EvaluationResult evaluation() { return evaluation; }
}

